-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Diagnostic Dumping Functionality #1443
base: develop
Are you sure you want to change the base?
Conversation
src/Private/Helpers.ps1
Fixed
# Invoke the method | ||
$methodInfo.Invoke($Runspace.Debugger, @($eventArgs)) | ||
|
||
Write-Host "DebuggerStopEvent raised successfully." |
Check warning
Code scanning / PSScriptAnalyzer
File 'Helpers.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdaneri There's a fair few comments, but the most important ones are for the DebuggerHandler class, so I would recommend reading those first.
Description
This pull request introduces a new function, Invoke-PodeDump, to capture detailed diagnostic information during critical failures or fatal exceptions within Pode.
Key Features
Configurable Dump Formats:
Pipeline Support:
ErrorRecord
parameter accepts pipeline input, simplifying integration with try-catch blocks.Dynamic Overrides:
Path
andFormat
.server.psd1
.Optional Application Halt:
-Halt
switch to terminate the application after saving the diagnostic dump.Configuration in
server.psd1
Example Usage
Diagnostic Dump with Halt:
Custom Configuration Overrides:
Notes